import request from '@/config/axios'
/**
 * 分页查询单位
 */
export const pageQuery = (params) => {
  return request.get({ url: '/unit/unit/page-query', params })
}

/**
 * 新增单位
 */
export const create = (data) => {
  return request.post({ url: '/unit/unit/create', data })
}

/**
 * 更新单位
 */
export const update = (data) => {
  return request.put({ url: '/unit/unit/update', data })
}

/**
 * 获取单个单位
 */
export const singleGet = (id) => {
  return request.get({ url: '/unit/unit/single-get?id=' + id })
}

/**
 * 查询单位
 */
export const simpleList = () => {
  return request.get({ url: '/unit/unit/simple-list' })
}

/**
 * 获取按单位类别聚合信息
 */
export const getGroupCategoryInfo = () => {
  return request.get({ url: '/unit/unit/get-group-category-info' })
}
